using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class Sphere : MonoBehaviour
{
    public float speed = 0;
    public float time = 0;
    private float time_ = 0;

    int i = 1;
    void Start()
    {
        
    }

    // Update is called once per frame
    void Update()
    {
        time_ = time_ + Time.deltaTime;
        if(time_>time)
        {
            time_ = 0;
            i = -i;
        }

        transform.Translate(Vector3.up * Time.deltaTime*speed*i, Space.World);
        
    }
}
